home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2833 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: mail2news.demon.co.uk!hpl3sn03.cern.ch
  2. From: Dan Pop <danpop@mail.cern.ch>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Why isn't return address in the stack protected?
  5. Date: Wed, 24 Jan 1996 12:45:43 +0100
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <9601241145.AA16544@dxmint.cern.ch>
  8. References: <DLo4xF.MH@un.seqeb.gov.au>
  9. X-NNTP-Posting-Host: hpl3sn03.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11. X-Mail2News-Path: dxmint.cern.ch!hpl3sn03.cern.ch
  12.  
  13. al012@svtstu.seqeb.gov.au (Anthony Lee) writes:
  14.  
  15. >to fall over.  My question is why can't the run time environment
  16. >protect the stack from such access and flag an error?
  17.  
  18. Because the run time environment has no way to distinguish between a
  19. correct write operation on the stack and an erroneous one.  The compiler
  20. can do this (at least in some cases), by generating appropriate code
  21. (and there are compilers that do it) but the program execution is
  22. considerably slowed down.
  23.  
  24. Dan
  25. -- 
  26. Dan Pop
  27. CERN, CN Division
  28. Email: danpop@mail.cern.ch 
  29. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  30.